home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Science / Asymptote Demo / Examples / Demos / 7) Linear Fit / Figure3d < prev    next >
Encoding:
Text File  |  1994-05-07  |  847 b   |  50 lines  |  [TEXT/DWat]

  1. datafile Pollen Data
  2. datalines 1 523
  3. readcolumn x 1
  4. readcolumn y 2
  5. rpn <y 1E-6 / >y   % change to micronepers
  6. graphlimits
  7. pointsymbol 4 cross
  8. sort
  9. fullscreen yes
  10. plotpoints
  11. drawframe
  12.  
  13. calc_correlation_coeff
  14. rpn <y >r0            % Save the y date in register 0
  15.  
  16. rpn 43 >e
  17. fitxy 1
  18. rpn <x a1 * a0 + >y
  19. pensize 1.5
  20. plotline
  21. pensize 0.25
  22.  
  23. TL
  24. digits 3
  25. fontsize 14
  26. drawlabel centerright Count = \a1 ±\asig1  \s¥ Distance  + \a0 ±\asig0
  27. TL
  28. pagemoveto xp yp 0.5 -
  29. drawlabel centerright Correlation Coeff: \r_cc
  30.  
  31. drawxlabel Distance (m)
  32. drawylabel Pollen Count
  33.  
  34. graphframe gleft gright gtop .25 + gtop 2 +
  35. showgraph
  36. drawaxis left inside outside line ticks perpendicular
  37. drawaxis right inside outside line ticks nolabels
  38.  
  39. rpn <y <r0 - >y rms
  40. set rms v0(1)
  41.  
  42. graphlimits
  43. drawylabel Fit RMS
  44. plotpoints
  45.  
  46. addheader
  47. figurenumber 3d Smith \\iet al.
  48.  
  49. fullscreen yes
  50. showpage